import { axios } from "./axiosKaiqiton"


/* 获取token */
export function getUserId(data: any) {
  return axios({
    url: '/kaiqitong_get_user_id',
    data,
    method: 'get'
  })
}
/* 获取需求类型 */
export function getType(data: any) {
  return axios({
    url: '/get_type',
    method: 'get',
    data
  })
}
/* 获取需求列表 */
export function getDemands(data: any) {
  return axios({
    url: '/get_demands',
    method: 'get',
    data
  })
}
/* 获取需求详情 */
export function getDemandDetail (data: any) {
  return axios({
    url: '/get_demand_by_id',
    method: 'get',
    data
  })
}
/* 聊天室聊天记录 */
export function getDemandChat (data: any) {
  return axios({
    url: '/demandChat',
    method: 'get',
    data
  })
}
/* 发送文字消息 */
export function demendSendText (data: any) {
  return axios({
    url: '/demandChat/send_text',
    method: 'post',
    data
  })
}
/* 需求 - 根据需求id获取对接人名称 */
export function getDemandNameById (data: any) {
  return axios({
    url: '/get_demandname_by_demandid',
    method: 'get',
    data
  })
}
/* 需求 - 修改需求为其它渠道状态 */
export function solveDemand (data: any) {
  return axios({
    url: '/update_demand_other_solve',
    method: 'post',
    data
  })
}
/* 需求 - 投诉 */
export function demandComplaint (data: any) {
  return axios({
    url: '/complaint',
    method: 'post',
    data
  })
}